<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>工程师信息页面</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <script type="text/javascript" src="./lib/layui/layui.js"
            charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form" method="post" enctype="multipart/form-data">
            <div class="layui-form-item">
                <div class="layui-input-inline">
                    <input type="hidden" id="id" name="id"
                           lay-verify="id" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label for="name" class="layui-form-label">
                    姓名
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="name" name="name"
                           lay-verify="name" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label" for="openid">微信openid</label>
                <div class="layui-input-inline">
                    <input type="text" id="openid" name="openid"
                           lay-verify="name" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label" for="tel">手机号</label>
                <div class="layui-input-inline">
                    <input type="text" id="tel" name="tel"
                           lay-verify="rejectMsg" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label for="yzm" class="layui-form-label"> <span
                        class="x-red"></span>验证码
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="yzm" name="yzm"
                           lay-verify="unitid" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label for="goodat" class="layui-form-label"> <span
                        class="x-red"></span>擅长
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="goodat" name="goodat"
                           lay-verify="unitid" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <span
                        class="x-red"></span>个人头像
                </label>
                <div class="layui-input-inline">
                    <div class="layui-upload">
                        <div class="layui-upload-list">
                            <img class="layui-upload-img" id="demo1" width="150px" height="150px">
                        </div>
                    </div>
                    <input type="hidden" id="personPic" name="personPic"
                           lay-verify="personPic" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <span
                        class="x-red"></span>身份证正面
                </label>
                <div class="layui-input-inline">
                    <div class="layui-upload">
                        <div class="layui-upload-list">
                            <img class="layui-upload-img" id="demo3" width="200px" height="150px">
                            <p id="demoText"></p>
                        </div>
                    </div>
                    <input type="hidden" id="idZheng" name="idZheng"
                           lay-verify="idZheng" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <span class="x-red"></span>身份证反面 </label>
                <div class="layui-input-inline">
                    <div class="layui-upload">
                        <div class="layui-upload-list">
                            <img class="layui-upload-img" id="demo2" width="200px" height="150px">
                        </div>
                    </div>
                    <input type="hidden" id="idFan" name="idFan"
                           lay-verify="idFan" autocomplete="off" class="layui-input">
                </div>
            </div>
        </form>
    </div>
</div>
<script>layui.use(['form',  'jquery'], function () {
    $ = layui.jquery;
    var form = layui.form;
    var id = location.search.substring(1);
    $.get("findRepairMan", {id: id}, function (data) {
        console.log(JSON.stringify(data.data));
        $("#id").prop("value", data.data.id);
        $("#name").prop("value", data.data.name);
        $("#openid").prop("value", data.data.openid);
        $("#tel").prop("value", data.data.tel);
        $("#yzm").prop("value", data.data.yzm);
        $("#goodat").prop("value", data.data.goodat);
        $("#demo1").prop("src", "/img/" + data.data.person_pic);
        $("#personPic").prop("value", data.data.person_pic);
        $("#demo3").prop("src", "/img/" + data.data.id_zheng);
        $("#idZheng").prop("value", data.data.id_zheng);
        $("#demo2").prop("src", "/img/" + data.data.id_fan);
        $("#idFan").prop("value", data.data.id_fan);
        form.render();//重绘表单
    });
});
</script>
</div>

</body>

</html>
